package JavaTest.superTest;

public class B extends A{
    public void hi(){
        System.out.println(super.n1 + " " + super.n2 + " " + super.n3);
    }

    public void sum(){
        System.out.println("B类的sum");
        //先在当前类找是否有cal(),再到父类中找cal(),
        cal();
        //等价于cal()
        this.cal();
        //直接查找父类的cal()
        super.cal();
    }
}
